<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>主页</title>
<style type="text/css">
body{
	margin: 0;
}
#text-t {
	background: #fff;
	width: 539px;
	height: 36px;
	text-align: left;
}
#btn-t{
	width: 100px;
    height: 42px;
    color: #fff;
    font-size: 15px;
    background: #3385ff;
    border: 0;
}
body>div{
	margin-top: 10%;
}
</style>
</head>
<body>
<div>
	
</div>
<center>
	<h1>请输入日期 如:2019/7/15</h1>
	<form action="">
		<input id="text-t" type="text"> 
		<input id="am" name="time" type="radio" value="am" checked="checked">上午
		<input id="pm" name="time" type="radio" value="pm" >下午
		<input id="btn-t" type="button" value="一键观看">
	</form>
</center>
<SCRIPT src="ckplayer/jquery-1.9.1.min.js"></SCRIPT>
<script type="text/javascript">
	var time = "am";
	$("#am").click(
		function(){
			time="am";
		}
	)
	$("#pm").click(
		function(){
			time="pm";
		}
	)
	$("#btn-t").click(
		function(){
			var day = $("#text-t").val();
			if(day == ""){
				alert('日期不能为空');
				return;
			}
			$("#am").val();
			$.ajax(
					{
						"url":"getVideo",
						"data":"day="+day+"&time="+time,
						"type":"post",
						"dataType":"json",
						"success":function(obj){
							if(obj.state==10){
								window.location.href="video.html"
							}else{
								alert(obj.msg);
							}
						}
					}
			);
		}		
	)
</script>
</body>
</html>